home *** CD-ROM | disk | FTP | other *** search
Text File | 1995-11-08 | 2.6 KB | 96 lines | [TEXT/MPS ] |
- //========================================================================================
- //
- // File: BoundShp.h
- // Release Version: $ 1.0d11 $
- //
- // Author: Henri Lamiraux
- //
- // Copyright: © 1993, 1995 by Apple Computer, Inc., all rights reserved.
- //
- //========================================================================================
-
- #ifndef BOUNDSHP_H
- #define BOUNDSHP_H
-
- #ifndef CONSTANT_H
- #include "Constant.h"
- #endif
-
- #ifndef BASESHP_H
- #include BASESHP_H
- #endif
-
- // ----- OS Layer -----
-
- #ifndef FWPOINT_H
- #include "FWPoint.h"
- #endif
-
- #ifndef FWRECT_H
- #include "FWRect.h"
- #endif
-
- // ----- Foundation Layer -----
-
- #ifndef FWRUNTYP_H
- #include "FWRunTyp.h"
- #endif
-
- //========================================================================================
- // Forward Declarations
- //========================================================================================
-
- /*#if FW_LIB_EXPORT_PRAGMAS
- #pragma import on
- #endif
- //class FW_CLASS_ATTR CDrawPart;
- //class FW_CLASS_ATTR FW_CGraphicContext;
- #if FW_LIB_EXPORT_PRAGMAS
- #pragma import off
- #endif
-
- class FW_CLASS_ATTR CDrawFacetClipper;*/
-
- //========================================================================================
- // class CBoundedShape
- //========================================================================================
-
- class FW_CLASS_ATTR CBoundedShape : public CBaseShape
- {
- public:
- FW_DECLARE_CLASS
-
- public:
- virtual ~CBoundedShape();
-
- // ----- Geometry
- virtual void SetShapeGeometry(const FW_CPoint& anchorPoint, const FW_CPoint& currentPoint);
- virtual void GetRectGeometry(FW_CRect& bounds) const;
- void SetRectGeometry(const FW_CRect& bounds);
-
- // ----- Dragging
- virtual void OffsetShape(Environment *ev, FW_CFixed xDelta, FW_CFixed yDelta);
-
- // ----- Resize
- virtual void ResizeFeedback(FW_CGraphicContext& gc, const FW_PInk& ink, const FW_PStyle& style,
- short whichHandle, const FW_CPoint& mouseLoc);
- virtual void GetMapRects(short whichHandle, const FW_CPoint& lastLocation,
- FW_CRect& srcRect, FW_CRect& dstRect);
- virtual void GetHandleCenter(short whichHandle, FW_CPoint& center) const;
- virtual void MapShape(Environment *ev, CDrawPart* part, const FW_CRect& srcRect, const FW_CRect& dstRect);
-
- // ----- Persistence
- virtual void Flatten(FW_CWritableStream& archive);
-
- protected:
- CBoundedShape(unsigned short shapeType, unsigned short renderVerb);
- CBoundedShape(FW_CReadableStream& archive);
-
- private:
- virtual void OutlineShape(FW_CGraphicContext& gc, const FW_PInk& ink, const FW_PStyle& style, const FW_CRect& rect) = 0;
-
- protected:
- FW_CRect fRect;
- };
-
- #endif